package com.cn.kabalifemerchants.ui.hall.adapter;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.cn.kabalifemerchants.R;
import com.cn.kabalifemerchants.ui.hall.bean.HallListBean;
import com.cn.kabalifemerchants.ui.page.bean.RecruitListBean;
import com.cn.kabalifemerchants.utils.GlideUtil;

import java.util.List;

/**
 * Created by 晓林 on 2020/10/20.
 * function:
 */
public class HallListAdapter extends BaseQuickAdapter<HallListBean.ResultBean.DataBean, BaseViewHolder> {

    public HallListAdapter(int layoutResId, @Nullable List<HallListBean.ResultBean.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, final HallListBean.ResultBean.DataBean item) {
        helper.addOnClickListener(R.id.tv_btn_next);
        helper.setText(R.id.tv_title, item.getTitle())
                .setText(R.id.tv_budget, "¥" + item.getBudget())
                .setText(R.id.tv_start_time, item.getStart_time());
        GlideUtil.ImageLoad(this.mContext, item.getIcon(), helper.getView(R.id.icon));
    }
}

